package com.boot.dog.web.security.service;

import com.boot.dog.common.exception.DogException;
import com.boot.dog.common.util.ApiResult;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: MaxLv
 * @Date: 2019/12/2
 */
@RestController
@Transactional(rollbackFor = DogException.class)
@RequestMapping("security")
public class SecurityRest {

    @GetMapping("/needLogin")
    public ApiResult<Void> needLogin() {
        throw new DogException("系统未登录，请重新登录");
    }
}
